package cn.xy.ymcc.service;

import cn.xy.ymcc.domain.PayOrder;
import cn.xy.ymcc.dto.AlipayNotifyDto;
import cn.xy.ymcc.dto.PayApplyDto;
import com.baomidou.mybatisplus.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xy.cao
 * @since 2022-07-31
 */
public interface IPayOrderService extends IService<PayOrder> {
    /**
     * 根据订单号查询支付单
     * @param orderNo
     */
    PayOrder selectByOrderNo(String orderNo);

    /**
     * 申请支付，触发支付宝返回form表单
     * @param payApplyDto
     * @return
     */
    String apply(PayApplyDto payApplyDto);

    /**
     * 支付成功
     * @param dto
     * @return
     * @throws Exception
     */
    String notify(AlipayNotifyDto dto) throws Exception;

    void cancelOrder(String orderNo);
}
